<template>
  <div id="app">
    <router-view/>
  </div>
</template>
<script>
import _ from "@/until/lodash";
export default {
  beforeMount(){
    console.log(window.location.href.split("?")[1])
    let getToken = window.location.href.split("?")[1];
    if(getToken){
      let getToken2 = getToken.split("&");
      let rouQuery = {}
      _.map(getToken2,item=>{
        let itemc = item.split("=")
        if(itemc[1]){
          rouQuery[itemc[0]] = itemc[1]
        }
      })
      if(rouQuery.uid && rouQuery.type != undefined){
        this.$store.commit("login",{token:rouQuery.uid,type:rouQuery.type})
      }
    }
  },

}
</script>
<style lang="stylus">

</style>
